import App from './App'
import enUS from '@/lang/en-US.js'
import zhCN from '@/lang/zh-CN.js'
import VueI18n from 'vue-i18n'
import '@/common/style/icon.css';
import '@/common/style/uni.less';
import '@/utils/point/event.js';
import pages from '@/utils/pages.js'//路由
import { routings } from '@/utils/routings.js'
const { logs } = require('@/utils/logs.js');
import {postPointData} from "@/utils/point/postPointData";
import path from '@/utils/point/path.js';
Vue.mixin(path);
// 在 main.js 或需要的地方引入
// import Vue from 'vue';
import VueClipboard from 'vue-clipboard2';

Vue.use(VueClipboard);

// #ifdef H5
// 提交前需要注释  本地调试使用
import vconsole from "vconsole";
new vconsole() // 使用 vconsole
// #endif

// #ifndef VUE3
import Vue from 'vue'
Vue.use(VueI18n)

Vue.config.productionTip = false
let lang = uni.getSystemInfoSync().language
console.log(lang)
// let lang = 'zh_CN'
const i18n = new VueI18n({
    locale:lang == 'zh-CN'? 'zh-CN' : 'en-US',
    messages:{
        'en-US':enUS,
        'zh-CN':zhCN
    }
})
Vue.prototype._i18n = i18n
Vue.prototype.$pages = pages
Vue.prototype.$routing = routings
Vue.prototype.$logs = logs
Vue.prototype.$postPointData = postPointData
App.mpType = 'app'
const app = new Vue({
	i18n,
    ...App
})
app.$mount()
// #endif


// if(!global.Intl){
//     require('intl');
//     require('intl/locale-data/jsonp/zh-Hans-CN')
// }

// #ifdef VUE3
import { createSSRApp } from 'vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif